<?php if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
	<div class="login-greeting">
	<?php if($params->get('name') == 0) : {
		echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name')));
	} else : {
		echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username')));
	} endif; ?>
	</div>
<?php endif; ?>
	<div class="logout-button">
		<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
		<input type="hidden" name="option" value="com_users" />
		<input type="hidden" name="task" value="user.logout" />
		<input type="hidden" name="return" value="<?php echo $return; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
<?php else : ?>

<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" class="f-login" >

						<fieldset>
							<a href="#" id="close-reveal-modal" class="close-reveal-modal"></a>
							<div class="f-login-top">
								<h2 class="ig-login">Partner login</h2>
								<p>Login to Partner Community
								Enter your username (e-mail) and password to login</p>
								<div>
									<label>Username</label>
									<input class="i-toggle" type="text" value="Enter your e-mail" id="modlgn-username"  name="username" />
								</div>
								<div>
									<label>Password</label>
									<input value="123456" class="i-toggle" id="modlgn-passwd" type="password" name="password" />
								</div>
								<a id="bntlogin" href="#" onclick="jQuery('#login-form').submit();">Login</a>
								<div class="chbox">
									<input class="cb" type="checkbox" />
									<span>Keep me logged in</span>
								</div>
							</div>
							<div class="f-login-b">
								<a href="#">Forgot your password?</a><br />
								<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration&Itemid=144', false);?>">Become a partner? Apply here </a>
							</div>
						</fieldset>
					
					<input type="hidden" name="option" value="com_users" />
					<input type="hidden" name="task" value="user.login" />
					<input type="hidden" name="return" value="<?php echo $return; ?>" />
					<?php echo JHtml::_('form.token'); ?>
</form>
<?php endif; ?>
<?php
return;
/**
 * @package		Joomla.Site
 * @subpackage	mod_login
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
	$app = JFactory::getApplication();
	$templatepath = JURI::base() . 'templates/' . $app->getTemplate();
?>
<form id="myModal" class="f-login reveal-modal" name="myModal" action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post">
    	<fieldset>
        <a href="#" class="close-reveal-modal"></a>
        	<h1>LOG IND ELLER OPRET KONTO</h1>
            <div class="f-login-l">
            	<h2>Eksisterende bruger</h2>
                <div>
                	<input id="modlgn-username" type="text" name="username" value="Brugernavn" />
                </div>
                <div>
                	<input id="modlgn-passwd" type="password" name="password" value="******" />
                </div>
                <div class="bnt-login"><a href="#" onclick="jQuery('#myModal').submit();">Login</a></div>
                <div class="ck">
                	<input id="modlgn-remember" type="checkbox" name="remember"/>
                    <span>Husk mig</span>
                </div>
                <div class="clear"></div>
                <div class="forget-pass"><a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">Har du glemt dit kodeord, tryk her</a></div>
            </div><!--.f-login-l-->
            <div class="f-login-r">
            	<h2>Ny bruger</h2>
                <p>Vil du registere dig som bruger ? Tryk venligst tilmeld.</p>
                <div class="bnt-subscribe"><a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">Tilmeld</a></div>
            </div><!--f-login-r"-->
        </fieldset>
		<input type="hidden" name="option" value="com_users" />
		<input type="hidden" name="task" value="user.login" />
		<input type="hidden" name="return" value="<?php echo $return; ?>" />
		<?php echo JHtml::_('form.token'); ?>
    </form>

<?php                        	       
$input_name = JText::_( 'Indtast din Navn' );
$input_phone = JText::_( 'Indtast din Telefon' );
$input_email = JText::_( 'Indtast din E-mail' );
$input_username = JText::_( 'Indtast din Brugernavn' );
$input_password = JText::_( 'Indtast din Kordeord' );
$input_password1 = JText::_( 'Indtast din Bekr�ft Kordeord' );
	
?>                        
 <script type="text/javascript">                   
jQuery(document).ready(function(jQuery) {
	jQuery.validator.addMethod('postalcode', function (value) { 
		if(value=='') return true;	
		return /^\d{4}$/.test(value); 
	   }, '');
	jQuery.validator.addMethod("notEqual", function(value, element, param) {
			return this.optional(element) || value !== param;
	});
		//jQuery("#postcode").mask("9999",{placeholder:""});  
		jQuery("#myModal").validate(
			{
				errorPlacement: function(error, element) {			
			},
			invalidHandler: function(form, validator) {
			  var errors = validator.numberOfInvalids();
			if (errors) {
                //$('#alert').html(validator['errorList'][0]['message']);
				jQuery('#alert').html(validator['errorList'][0]['message']);
    			jQuery('#backoverlay').show();
    			jQuery('#show_popup').show();
            	jQuery('#f_focus').html(validator['errorList'][0]['element'].name);
				validator['errorList'][0]['element'].focus();
				
			  } else {
			  }
			},
			rules: {
				username:{
					required: true,
					notEqual: "Brugernavn",
				},		
				password:{
					required: true,
					notEqual: "******",
				},	
				
			},
			messages: {
				username: "<?php echo $input_username; ?>",
				password: "<?php echo $input_password; ?>",
				
			
			}
		});
        close_popup=function(){		
			var fel=jQuery('#f_focus').html();
            jQuery('#backoverlay').hide();
    		jQuery('#show_popup').hide();
    		jQuery('#' + fel ).focus();		
      };
      
      
	});
</script>
<?php return; ?>
<?php if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
	<div class="login-greeting">
	<?php if($params->get('name') == 0) : {
		echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name')));
	} else : {
		echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username')));
	} endif; ?>
	</div>
<?php endif; ?>
	<div class="logout-button">
		<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
		<input type="hidden" name="option" value="com_users" />
		<input type="hidden" name="task" value="user.logout" />
		<input type="hidden" name="return" value="<?php echo $return; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
<?php else : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >
	<?php if ($params->get('pretext')): ?>
		<div class="pretext">
		<p><?php echo $params->get('pretext'); ?></p>
		</div>
	<?php endif; ?>
	<fieldset class="userdata">
	<p id="form-login-username">
		<label for="modlgn-username"><?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?></label>
		<input id="modlgn-username" type="text" name="username" class="inputbox"  size="18" />
	</p>
	<p id="form-login-password">
		<label for="modlgn-passwd"><?php echo JText::_('JGLOBAL_PASSWORD') ?></label>
		<input id="modlgn-passwd" type="password" name="password" class="inputbox" size="18"  />
	</p>
	<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
	<p id="form-login-remember">
		<label for="modlgn-remember"><?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?></label>
		<input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/>
	</p>
	<?php endif; ?>
	<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGIN') ?>" />
	<input type="hidden" name="option" value="com_users" />
	<input type="hidden" name="task" value="user.login" />
	<input type="hidden" name="return" value="<?php echo $return; ?>" />
	<?php echo JHtml::_('form.token'); ?>
	</fieldset>
	<ul>
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
			<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
		</li>
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
			<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
		</li>
		<?php
		$usersConfig = JComponentHelper::getParams('com_users');
		if ($usersConfig->get('allowUserRegistration')) : ?>
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
				<?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>
		</li>
		<?php endif; ?>
	</ul>
	<?php if ($params->get('posttext')): ?>
		<div class="posttext">
		<p><?php echo $params->get('posttext'); ?></p>
		</div>
	<?php endif; ?>
</form>
<?php endif; ?>
